<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled with this
 * package in the file LICENSE.txt. It is also available through the
 * world-wide-web at this URL: http://dragonjsonserver.de/license. If you did
 * not receive a copy of the license and are unable to obtain it through the
 * world-wide-web, please send an email to license@dragonjsonserver.de. So we
 * can send you a copy immediately.
 *
 * @copyright Copyright (c) 2012 DragonProjects (http://dragonprojects.de)
 * @license http://framework.zend.com/license/new-bsd New BSD License
 * @author Christoph Herrmann <developer@dragonjsonserver.de>
 */
?>
<?php
echo $this->configStartpage->title;
echo $this->configStartpage->content;

echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml');
if (count($this->paginator) > 0) {
    echo '<div class="row">';
    foreach ($this->paginator as $key => $news) {
        if ($key > 0 && $key % $this->configNews->perrow == 0) {
            echo '</div><div class="row">';
        }
        echo
              '<div class="span' . (int)(12 / $this->configNews->perrow) . '">'
                . '<h3>' . $this->escape($news['title']) . '</h3>'
                . '<p>' . ($news['timestamp'] == 0 ? 'noch offen' : date('d.m.Y', $news['timestamp'])) . '</p>'
                . '<p>' . $this->escape($news['content']) . '</p>'
            . '</div>';
    }
    echo '</div>';
}
?>
